Optimal. Leaf size=122 \[ -\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x)}{d}-a^2 x-\frac {2 a b \csc ^5(c+d x)}{5 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc (c+d x)}{d}-\frac {b^2 \cot ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3886, 3473, 8, 2606, 194, 2607, 30} \[ -\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot (c+d x)}{d}-a^2 x-\frac {2 a b \csc ^5(c+d x)}{5 d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc (c+d x)}{d}-\frac {b^2 \cot ^5(c+d x)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 194
Rule 2606
Rule 2607
Rule 3473
Rule 3886
Rubi steps
\begin {align*} \int \cot ^6(c+d x) (a+b \sec (c+d x))^2 \, dx &=\int \left (a^2 \cot ^6(c+d x)+2 a b \cot ^5(c+d x) \csc (c+d x)+b^2 \cot ^4(c+d x) \csc ^2(c+d x)\right ) \, dx\\ &=a^2 \int \cot ^6(c+d x) \, dx+(2 a b) \int \cot ^5(c+d x) \csc (c+d x) \, dx+b^2 \int \cot ^4(c+d x) \csc ^2(c+d x) \, dx\\ &=-\frac {a^2 \cot ^5(c+d x)}{5 d}-a^2 \int \cot ^4(c+d x) \, dx-\frac {(2 a b) \operatorname {Subst}\left (\int \left (-1+x^2\right )^2 \, dx,x,\csc (c+d x)\right )}{d}+\frac {b^2 \operatorname {Subst}\left (\int x^4 \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {b^2 \cot ^5(c+d x)}{5 d}+a^2 \int \cot ^2(c+d x) \, dx-\frac {(2 a b) \operatorname {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\csc (c+d x)\right )}{d}\\ &=-\frac {a^2 \cot (c+d x)}{d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {b^2 \cot ^5(c+d x)}{5 d}-\frac {2 a b \csc (c+d x)}{d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc ^5(c+d x)}{5 d}-a^2 \int 1 \, dx\\ &=-a^2 x-\frac {a^2 \cot (c+d x)}{d}+\frac {a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {b^2 \cot ^5(c+d x)}{5 d}-\frac {2 a b \csc (c+d x)}{d}+\frac {4 a b \csc ^3(c+d x)}{3 d}-\frac {2 a b \csc ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.59, size = 198, normalized size = 1.62 \[ -\frac {\csc ^5(c+d x) \left (10 \left (5 a^2+3 b^2\right ) \cos (c+d x)+150 a^2 c \sin (c+d x)+150 a^2 d x \sin (c+d x)-75 a^2 c \sin (3 (c+d x))-75 a^2 d x \sin (3 (c+d x))+15 a^2 c \sin (5 (c+d x))+15 a^2 d x \sin (5 (c+d x))-25 a^2 \cos (3 (c+d x))+23 a^2 \cos (5 (c+d x))-80 a b \cos (2 (c+d x))+60 a b \cos (4 (c+d x))+116 a b+15 b^2 \cos (3 (c+d x))+3 b^2 \cos (5 (c+d x))\right )}{240 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 152, normalized size = 1.25 \[ -\frac {30 \, a b \cos \left (d x + c\right )^{4} + {\left (23 \, a^{2} + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{5} - 35 \, a^{2} \cos \left (d x + c\right )^{3} - 40 \, a b \cos \left (d x + c\right )^{2} + 15 \, a^{2} \cos \left (d x + c\right ) + 16 \, a b + 15 \, {\left (a^{2} d x \cos \left (d x + c\right )^{4} - 2 \, a^{2} d x \cos \left (d x + c\right )^{2} + a^{2} d x\right )} \sin \left (d x + c\right )}{15 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.21, size = 273, normalized size = 2.24 \[ \frac {3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 50 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 480 \, {\left (d x + c\right )} a^{2} + 330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 300 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 30 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {330 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 300 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 30 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 50 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{2} + 6 \, a b + 3 \, b^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.81, size = 154, normalized size = 1.26 \[ \frac {a^{2} \left (-\frac {\left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}-\cot \left (d x +c \right )-d x -c \right )+2 a b \left (-\frac {\cos ^{6}\left (d x +c \right )}{5 \sin \left (d x +c \right )^{5}}+\frac {\cos ^{6}\left (d x +c \right )}{15 \sin \left (d x +c \right )^{3}}-\frac {\cos ^{6}\left (d x +c \right )}{5 \sin \left (d x +c \right )}-\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}\right )-\frac {b^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{5 \sin \left (d x +c \right )^{5}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.66, size = 96, normalized size = 0.79 \[ -\frac {{\left (15 \, d x + 15 \, c + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{\tan \left (d x + c\right )^{5}}\right )} a^{2} + \frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{4} - 10 \, \sin \left (d x + c\right )^{2} + 3\right )} a b}{\sin \left (d x + c\right )^{5}} + \frac {3 \, b^{2}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.50, size = 191, normalized size = 1.57 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\left (a-b\right )}^2}{160\,d}-a^2\,x-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {a^2}{16}-\frac {a\,b}{12}+\frac {b^2}{48}+\frac {{\left (a-b\right )}^2}{96}\right )}{d}-\frac {\frac {2\,a\,b}{5}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (22\,a^2+20\,a\,b+2\,b^2\right )+\frac {a^2}{5}+\frac {b^2}{5}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {7\,a^2}{3}+\frac {10\,a\,b}{3}+b^2\right )}{32\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {21\,a^2}{32}-\frac {9\,a\,b}{16}+\frac {b^2}{32}+\frac {{\left (a-b\right )}^2}{32}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cot ^{6}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________